<!DOCTYPE html >
<!-- 在Html标签中加入thymeleaf 的命名空间   xmlns==>  xml name space-->
<html lang="en" xmlns:th="www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link type="text/css" rel="stylesheet" href="css/style.css" />
    <!--[if IE 6]>
    <script src="js/iepng.js" type="text/javascript"></script>
        <script type="text/javascript">
           EvPNG.fix('div, ul, img, li, input, a'); 
        </script>
    <![endif]-->
        
    <script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="js/menu.js"></script>    
        
	<script type="text/javascript" src="js/select.js"></script>
	<script type="text/javascript" src="js/jquery-1.11.1.min_044d0927.js"></script>
   <script type="text/javascript" src="js/jquery.bxslider_e88acd1b.js"></script>
        
    
<title>尤洪</title>
</head>
<body>  
<div th:replace="head::headHtml">
<!--Begin Header Begin-->
<div class="soubg">
	<div class="sou">
    	<!--Begin 所在收货地区 Begin-->
    	<span class="s_city_b">
        	<span class="fl">送货至：</span>
            <span class="s_city">
            	<span>四川</span>
                <div class="s_city_bg">
                	<div class="s_city_t"></div>
                    <div class="s_city_c">
                    	<h2>请选择所在的收货地区</h2>
                        <table border="0" class="c_tab" style="width:235px; margin-top:10px;" cellspacing="0" cellpadding="0">
                          <tr>
                            <th>A</th>
                            <td class="c_h"><span>安徽</span><span>澳门</span></td>
                          </tr>
                          <tr>
                            <th>B</th>
                            <td class="c_h"><span>北京</span></td>
                          </tr>
                          <tr>
                            <th>C</th>
                            <td class="c_h"><span>重庆</span></td>
                          </tr>
                          <tr>
                            <th>F</th>
                            <td class="c_h"><span>福建</span></td>
                          </tr>
                          <tr>
                            <th>G</th>
                            <td class="c_h"><span>广东</span><span>广西</span><span>贵州</span><span>甘肃</span></td>
                          </tr>
                          <tr>
                            <th>H</th>
                            <td class="c_h"><span>河北</span><span>河南</span><span>黑龙江</span><span>海南</span><span>湖北</span><span>湖南</span></td>
                          </tr>
                          <tr>
                            <th>J</th>
                            <td class="c_h"><span>江苏</span><span>吉林</span><span>江西</span></td>
                          </tr>
                          <tr>
                            <th>L</th>
                            <td class="c_h"><span>辽宁</span></td>
                          </tr>
                          <tr>
                            <th>N</th>
                            <td class="c_h"><span>内蒙古</span><span>宁夏</span></td>
                          </tr>
                          <tr>
                            <th>Q</th>
                            <td class="c_h"><span>青海</span></td>
                          </tr>
                          <tr>
                            <th>S</th>
                            <td class="c_h"><span>上海</span><span>山东</span><span>山西</span><span class="c_check">四川</span><span>陕西</span></td>
                          </tr>
                          <tr>
                            <th>T</th>
                            <td class="c_h"><span>台湾</span><span>天津</span></td>
                          </tr>
                          <tr>
                            <th>X</th>
                            <td class="c_h"><span>西藏</span><span>香港</span><span>新疆</span></td>
                          </tr>
                          <tr>
                            <th>Y</th>
                            <td class="c_h"><span>云南</span></td>
                          </tr>
                          <tr>
                            <th>Z</th>
                            <td class="c_h"><span>浙江</span></td>
                          </tr>
                        </table>
                    </div>
                </div>
            </span>
        </span>
        <!--End 所在收货地区 End-->
        <span class="fr">
        	<span class="fl">你好，请<a href="Login.html">登录</a>&nbsp; <a href="Regist.html" style="color:#ff4e00;">免费注册</a>&nbsp;|&nbsp;<a href="#">我的订单</a>&nbsp;|</span>
        	<span class="ss">
            	<div class="ss_list">
                	<a href="#">收藏夹</a>
                    <div class="ss_list_bg">
                    	<div class="s_city_t"></div>
                        <div class="ss_list_c">
                        	<ul>
                            	<li><a href="#">我的收藏夹</a></li>
                                <li><a href="#">我的收藏夹</a></li>
                            </ul>
                        </div>
                    </div>     
                </div>
                <div class="ss_list">
                	<a href="#">客户服务</a>
                    <div class="ss_list_bg">
                    	<div class="s_city_t"></div>
                        <div class="ss_list_c">
                        	<ul>
                            	<li><a href="#">客户服务</a></li>
                                <li><a href="#">客户服务</a></li>
                                <li><a href="#">客户服务</a></li>
                            </ul>
                        </div>
                    </div>    
                </div>
                <div class="ss_list">
                	<a href="#">网站导航</a>
                    <div class="ss_list_bg">
                    	<div class="s_city_t"></div>
                        <div class="ss_list_c">
                        	<ul>
                            	<li><a href="#">网站导航</a></li>
                                <li><a href="#">网站导航</a></li>
                            </ul>
                        </div>
                    </div>    
                </div>
            </span>
            <span class="fl">|&nbsp;关注我们：</span>
            <span class="s_sh"><a href="#" class="sh1">新浪</a><a href="#" class="sh2">微信</a></span>
            <span class="fr">|&nbsp;<a href="#">手机版&nbsp;<img src="images/s_tel.png" align="absmiddle" /></a></span>
        </span>
    </div>
</div>
<div class="m_top_bg">
    <div class="top">
        <div class="m_logo"><a href="Index.html"><img src="images/logo1.png" /></a></div>
        <div class="m_search">
            <form>
                <input type="text" value="" class="m_ipt" />
                <input type="submit" value="搜索" class="m_btn" />
            </form>                      
            <span class="fl"><a href="#">咖啡</a><a href="#">iphone 6S</a><a href="#">新鲜美食</a><a href="#">蛋糕</a><a href="#">日用品</a><a href="#">连衣裙</a></span>
        </div>
         <div class="i_car">
			<div class="car_t" >
				<div th:each="car,cStat:${clist}">
					购物车 [ <span th:text="${cStat.size}"></span> ]
				</div>
			</div>
			<div class="car_bg">
				<!--Begin 购物车未登录 Begin-->
				<div class="un_login">
					还未登录！<a href="Login.html" style="color: #ff4e00;">马上登录</a> 查看购物车！
				</div>
				<!--End 购物车未登录 End-->
				<!--Begin 购物车已登录 Begin-->
				<ul class="cars">
					<li th:each="car,cStat:${clist}">
							<div class="img">
								<a th:href="@{'/product?id='+${car.productSpecs.products.id}}"><img th:src="${car.productSpecs.image.get(0).url}" width="58" height="58" /></a>
							</div>
						<div th:each="list:${car.productSpecs}">
							<div th:each="plist,pStat:${car.productSpecs.products}">
								<div class="name">
									<span><a th:href="@{'/product?id='+${plist.id}}" th:text="${plist.name}"></a></span>
								</div>
								<div class="price">
									<font color="#ff4e00">￥&nbsp;<span
										th:text="${list.productPrice}"></span></font>&nbsp;&nbsp;X&nbsp;<span
										th:text="${car.count}"></span>
								</div>
								<span style="display: none" th:class="'prices'+${cStat.index}"
									th:text="${#aggregates.sum({car.count*list.productPrice})}"></span>

							</div>
						</div>

					</li>
				</ul>
				<div>
					<div class="price_sum">
						共计&nbsp; <font color="#ff4e00">￥</font> <span id="totalPrice"></span>

					</div>
					<script th:inline="javascript">
						var size = [[${clist.size()}]];
						var totalPrice = 0;
						for(i = 0; i < size; i++){
							console.log($('.prices'+i).text());
							totalPrice +=Number($('.prices'+i).text());
						}
						$('#totalPrice').html(totalPrice);
						console.log(totalPrice);
                   </script>
				</div>
				<div class="price_a">
					<a href="BuyCar.do">去购物车结算</a>
				</div>
				<!--End 购物车已登录 End-->
			</div>
        </div>
    </div>
</div>
<!--End Header End--> 
</div>
<div class="i_bg bg_color">
    <!--Begin 用户中心 Begin -->
	<div class="m_content">
   		<div class="m_left">
        	<div class="left_n">管理中心</div>
            <div class="left_m">
            	<div class="left_m_t t_bg1">订单中心</div>
                <ul>
                	<li><a href="MemberOrder.do" class="now">我的订单</a></li>
                    <li><a href="Member_Address.do">收货地址</a></li>
                    <!-- <li><a href="#">缺货登记</a></li>
                    <li><a href="#">跟踪订单</a></li> -->
                </ul>
            </div>
            <div class="left_m">
            	<div class="left_m_t t_bg2">会员中心</div>
                <ul>
                	<li><a href="member">用户信息</a></li>
                    <li><a href="favorite" class="now">我的收藏</a></li>
                    <!-- <li><a href="Member_Links.html">推广链接</a></li> -->
                    <li><a href="comment">我的评论</a></li>
                </ul>
            </div>
            <div class="left_m">
            	<div class="left_m_t t_bg3">账户中心</div>
                <ul>
                	<li><a href="Member_Safe.do">账户安全</a></li>
                    <!-- <li><a href="Member_Packet.html">我的红包</a></li>
                    <li><a href="Member_Money.html">资金管理</a></li> -->
                </ul>
            </div>
            <!-- <div class="left_m">
            	<div class="left_m_t t_bg4">分销中心</div>
                <ul>
                	<li><a href="Member_Member.html">我的会员</a></li>
                    <li><a href="Member_Results.html">我的业绩</a></li>
                    <li><a href="Member_Commission.html">我的佣金</a></li>
                    <li><a href="Member_Cash.html">申请提现</a></li>
                </ul>
            </div> -->
        </div>
		<div class="m_right">
            <p></p>
            <div class="mem_tit">
            <div th:each="favorite,fStat:${flist}">
            	<span class="fr" style="font-size:12px; color:#55555; font-family:'宋体'; margin-top:5px;">共发现<span th:text="${fStat.size}"></span>件</span>我的收藏
            </div>
            </div>
           	<table border="0" class="order_tab" style="width:930px;" cellspacing="0" cellpadding="0">
              <tr>                                                                                                                                       
                <td align="center" width="420">商品名称</td>
                <td align="center" width="180">价格</td>
                <td align="center" width="270">操作</td>
              </tr>
              <tr th:each="favorite:${flist}">
                <td style="font-family:'宋体';">
                	<div class="sm_img" >
                	   <a th:href="@{'/product?id='+${favorite.products.id}}"><img th:src="${favorite.image.get(0).url}" width="48" height="48" /></a>
                	</div>
                	<span ><a th:href="@{'/product?id='+${favorite.products.id}}" th:text="${favorite.products.name}"></a></span><br>
                	<span><a th:href="@{'/brandlist?business='+${favorite.products.business}}">[进入店铺]</a></span>
                </td>
                <td align="center">￥<span th:text="${favorite.products.marketPrice}"></span></td>
                <td align="center"> <a href="javascript:void(0)" th:value="${favorite.id}" th:onclick="|ShowDv('MyDiv','fade','${favorite.id}')|">删除</a></td>
              </tr>
            </table>

             <!-- 分页显示 -->
             <div class="pages" style="text-align: center;">
                <a th:if="${flist.pageNum!=1}" href="/favorite">首&nbsp;页</a>
                <a href="#" class="p_pre" th:if="${flist.pageNum!=1}" 
                th:href="@{'/favorite?pre'+${flist.pageNum-1}}">上一页</a>
                
                <a href="#" class="p_pre" th:if="${flist.pages&gt;0}" th:text="${flist.pageNum}" 
                th:href="'/favorite?next='+${flist.pageNum}"></a>
               
                <a href="#" class="p_pre" th:if="${flist.pageNum}&lt;${flist.pages}" th:text="${flist.pageNum}+1" 
                th:href="'/favorite?next='+${flist.pageNum+1}"></a>
                
                <a href="#" class="p_pre" th:if="${flist.pageNum+1}&lt;${flist.pages}" th:text="${flist.pageNum}+2" 
                th:href="'/favorite?next='+${flist.pageNum+2}"></a>
                
                <a th:if="${flist.pageNum}&lt;${flist.pages}" 
                th:href="'/favorite?next='+${flist.pageNum+1}">下一页</a>
               
                <a th:if="${flist.pageNum!=flist.pages}" 
                th:href="'/favorite?next='+${flist.pages}">尾&nbsp;页</a>
                <a class="p_pre">共
                <span style="display: none" class="total" th:text="${flist.total}"></span>
                <span style="display: none" class="pageSize" th:text="${flist.pageSize}"></span>
                <span class="totalPage"></span>页</a>
	             <script th:inline="javascript">
	                var total=$('.total').html();
	                var pageSize=$('.pageSize').html();
	                var totalPage=Math.ceil(total/pageSize);
	                console.log(totalPage);
	                $('.totalPage').html(totalPage);
	             </script>
             </div>
            
        </div>
    </div>
	<!--End 用户中心 End--> 
	
	 <!--Begin 弹出层-删除商品 Begin-->
    <div id="fade" class="black_overlay"></div>
    <div id="MyDiv" class="white_content">             
        <div class="white_d">
            <div class="notice_t">
                <span class="fr" style="margin-top:10px; cursor:pointer;" onclick="CloseDv('MyDiv','fade')"><img src="images/close.gif" /></span>
            </div>
            <div class="notice_c">
           		
                <table border="0" align="center" style="font-size:16px;" cellspacing="0" cellpadding="0">
                  <tr valign="top">
                    <td>您确定要把该商品移除我的收藏吗？</td>
                  </tr>
                  <tr height="50" valign="bottom" >
                    <td>
                    <a href="#" id="b_sure" class="b_sure">确定</a>
                    <a href="#" class="b_buy"  onclick="CloseDv('MyDiv','fade')" >取消</a>
                    </td>
                  </tr>
                </table>
                    
            </div>
        </div>
    </div>    
    <!--End 弹出层-删除商品 End-->
    

    <!--Begin 弹出层-删除商品失败 Begin-->
    <div id="fade2" class="black_overlay"></div>
    <div id="MyDiv2" class="white_content">             
        <div class="white_d">
            <div class="notice_t">
                <span class="fr" style="margin-top:10px; cursor:pointer;" onclick="CloseDv('MyDiv2','fade2')"><img src="images/close.gif" /></span>
            </div>
            <div class="notice_c">
           		
                <table border="0" align="center" style="font-size:16px;" cellspacing="0" cellpadding="0">
                  <tr valign="top">
                    <td>您的请求提交失败</td>
                  </tr>
                  <tr height="50" valign="bottom" >
                    <td>
                    <a href="#" class="b_sure" onclick="CloseDv('MyDiv2','fade2')" >确定</a>
                    </td>
                  </tr>
                </table>
                    
            </div>
        </div>
    </div>    
    <!--End 弹出层-删除商品失败 End-->
    
	
    <!--Begin Footer Begin -->
    <div class="b_btm_bg b_btm_c">
        <div class="b_btm">
            <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
              <tr>
                <td width="72"><img src="images/b1.png" width="62" height="62" /></td>
                <td><h2>正品保障</h2>正品行货  放心购买</td>
              </tr>
            </table>
			<table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
              <tr>
                <td width="72"><img src="images/b2.png" width="62" height="62" /></td>
                <td><h2>满38包邮</h2>满38包邮 免运费</td>
              </tr>
            </table>
            <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
              <tr>
                <td width="72"><img src="images/b3.png" width="62" height="62" /></td>
                <td><h2>天天低价</h2>天天低价 畅选无忧</td>
              </tr>
            </table>
            <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
              <tr>
                <td width="72"><img src="images/b4.png" width="62" height="62" /></td>
                <td><h2>准时送达</h2>收货时间由你做主</td>
              </tr>
            </table>
        </div>
    </div>
    <div class="b_nav">
    	<dl>                                                                                            
        	<dt><a href="#">新手上路</a></dt>
            <dd><a href="#">售后流程</a></dd>
            <dd><a href="#">购物流程</a></dd>
            <dd><a href="#">订购方式</a></dd>
            <dd><a href="#">隐私声明</a></dd>
            <dd><a href="#">推荐分享说明</a></dd>
        </dl>
        <dl>
        	<dt><a href="#">配送与支付</a></dt>
            <dd><a href="#">货到付款区域</a></dd>
            <dd><a href="#">配送支付查询</a></dd>
            <dd><a href="#">支付方式说明</a></dd>
        </dl>
        <dl>
        	<dt><a href="#">会员中心</a></dt>
            <dd><a href="#">资金管理</a></dd>
            <dd><a href="#">我的收藏</a></dd>
            <dd><a href="#">我的订单</a></dd>
        </dl>
        <dl>
        	<dt><a href="#">服务保证</a></dt>
            <dd><a href="#">退换货原则</a></dd>
            <dd><a href="#">售后服务保证</a></dd>
            <dd><a href="#">产品质量保证</a></dd>
        </dl>
        <dl>
        	<dt><a href="#">联系我们</a></dt>
            <dd><a href="#">网站故障报告</a></dd>
            <dd><a href="#">购物咨询</a></dd>
            <dd><a href="#">投诉与建议</a></dd>
        </dl>
        <div class="b_tel_bg">
        	<a href="#" class="b_sh1">新浪微博</a>            
        	<a href="#" class="b_sh2">腾讯微博</a>
            <p>
            服务热线：<br />
            <span>400-123-4567</span>
            </p>
        </div>
        <div class="b_er">
            <div class="b_er_c"><img src="images/er.gif" width="118" height="118" /></div>
            <img src="images/ss.png" />
        </div>
    </div>    
    <div class="btmbg">
		<div class="btm">
        	备案/许可证编号：蜀ICP备12009302号-1-www.dingguagua.com   Copyright © 2015-2018 尤洪商城网 All Rights Reserved. 复制必究 , Technical Support: Dgg Group <br />
            <img src="images/b_1.gif" width="98" height="33" /><img src="images/b_2.gif" width="98" height="33" /><img src="images/b_3.gif" width="98" height="33" /><img src="images/b_4.gif" width="98" height="33" /><img src="images/b_5.gif" width="98" height="33" /><img src="images/b_6.gif" width="98" height="33" />
        </div>    	
    </div>
    <!--End Footer End -->    
</div>
<script src="js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" th:inline="javascript">
//弹窗提醒
function ShowDv(show_div,bg_div,id){

	var str='<a class="b_sure" href="javascript:void(0)" onclick="deleteFavorite('+id+')">确定</a>'
	$('#b_sure').html(str);
	
	document.getElementById(show_div).style.display='block';
	document.getElementById(bg_div).style.display='block' ;
	var bgdiv = document.getElementById(bg_div);
	bgdiv.style.width = document.body.scrollWidth;
	// bgdiv.style.height = $(document).height();
	jQuery("#"+bg_div).height(jQuery(document).height());
};


//删除收藏的商品
function deleteFavorite(id){
	$.post('del',{
		id:id
	},function(data){
		alert(data.sucess)
		if(data.sucess==1){ 
			CloseDv('MyDiv','fade');
			$(".order_tab").load(location.href+" .order_tab");
		}else{
			 CloseDv('MyDiv','fade');
			 ShowDv2('MyDiv2','fade2')
			 
		}
			
	},'json');
	
	
}

//删除商品失败时用
function ShowDv2(show_div,bg_div){
	
	document.getElementById(show_div).style.display='block';
	document.getElementById(bg_div).style.display='block' ;
	var bgdiv = document.getElementById(bg_div);
	bgdiv.style.width = document.body.scrollWidth;
	// bgdiv.style.height = $(document).height();
	jQuery("#"+bg_div).height(jQuery(document).height());
};

function CloseDv(show_div,bg_div)
{
	document.getElementById(show_div).style.display='none';
	document.getElementById(bg_div).style.display='none';
};



</script>
</body>


<!--[if IE 6]>
<script src="//letskillie6.googlecode.com/svn/trunk/2/zh_CN.js"></script>
<![endif]-->
</html>
